var __wxAppData = __wxAppData || {};
var __wxRoute = __wxRoute || "";
var __wxRouteBegin = __wxRouteBegin || "";
var __wxAppCode__ = __wxAppCode__ || {};
var global = global || {};
var __WXML_GLOBAL__ = __WXML_GLOBAL__ || {
  entrys: {},
  defines: {},
  modules: {},
  ops: [],
  wxs_nf_init: undefined,
  total_ops: 0,
};
var __wxAppCurrentFile__ = __wxAppCurrentFile__ || "";
var Component = Component || function () {};
var definePlugin = definePlugin || function () {};
var requirePlugin = requirePlugin || function () {};
var Behavior = Behavior || function () {};
var __vd_version_info__ = __vd_version_info__ || {};
var __GWX_GLOBAL__ = __GWX_GLOBAL__ || {};
__wxCodeSpace__.batchAddCompiledScripts(function (R, D, Q, gdc) {});
__wxRoute = undefined;
__wxRouteBegin = undefined;
__wxAppCurrentFile__ = undefined;
define(
  "7150F4A29100CF2F17369CA5E50C2D82.js",
  function (
    require,
    module,
    exports,
    window,
    document,
    frames,
    self,
    location,
    navigator,
    localStorage,
    history,
    Caches,
    screen,
    alert,
    confirm,
    prompt,
    XMLHttpRequest,
    WebSocket,
    Reporter,
    webkit,
    WeixinJSCore
  ) {
    "use strict";
    var e = wx.getRealtimeLogManager ? wx.getRealtimeLogManager() : null;
    module.exports = {
      debug: function () {
        e && e.debug.apply(e, arguments);
      },
      info: function () {
        e && e.info.apply(e, arguments);
      },
      warn: function () {
        e && e.warn.apply(e, arguments);
      },
      error: function () {
        e && e.error.apply(e, arguments);
      },
      setFilterMsg: function (t) {
        e && e.setFilterMsg && "string" == typeof t && e.setFilterMsg(t);
      },
      addFilterMsg: function (t) {
        e && e.addFilterMsg && "string" == typeof t && e.addFilterMsg(t);
      },
    };
  },
  {
    isPage: false,
    isComponent: false,
    currentFile: "7150F4A29100CF2F17369CA5E50C2D82.js",
  }
);
__wxRoute = undefined;
__wxRouteBegin = undefined;
__wxAppCurrentFile__ = undefined;
define(
  "@babel/runtime/helpers/asyncToGenerator.js",
  function (
    require,
    module,
    exports,
    window,
    document,
    frames,
    self,
    location,
    navigator,
    localStorage,
    history,
    Caches,
    screen,
    alert,
    confirm,
    prompt,
    XMLHttpRequest,
    WebSocket,
    Reporter,
    webkit,
    WeixinJSCore
  ) {
    function asyncGeneratorStep(n, e, r, t, o, a, c) {
      try {
        var i = n[a](c),
          u = i.value;
      } catch (n) {
        return void r(n);
      }
      i.done ? e(u) : Promise.resolve(u).then(t, o);
    }
    function _asyncToGenerator(n) {
      return function () {
        var e = this,
          r = arguments;
        return new Promise(function (t, o) {
          var a = n.apply(e, r);
          function c(n) {
            asyncGeneratorStep(a, t, o, c, i, "next", n);
          }
          function i(n) {
            asyncGeneratorStep(a, t, o, c, i, "throw", n);
          }
          c(void 0);
        });
      };
    }
    module.exports = _asyncToGenerator;
  },
  {
    isPage: false,
    isComponent: false,
    currentFile: "@babel/runtime/helpers/asyncToGenerator.js",
  }
);
__wxRoute = undefined;
__wxRouteBegin = undefined;
__wxAppCurrentFile__ = undefined;
define(
  "@babel/runtime/helpers/regeneratorRuntime.js",
  function (
    require,
    module,
    exports,
    window,
    document,
    frames,
    self,
    location,
    navigator,
    localStorage,
    history,
    Caches,
    screen,
    alert,
    confirm,
    prompt,
    XMLHttpRequest,
    WebSocket,
    Reporter,
    webkit,
    WeixinJSCore
  ) {
    var t = require("./typeof");
    function r() {
      (module.exports = r =
        function () {
          return e;
        }),
        (module.exports.__esModule = !0),
        (module.exports.default = module.exports);
      var e = {},
        n = Object.prototype,
        o = n.hasOwnProperty,
        i =
          Object.defineProperty ||
          function (t, r, e) {
            t[r] = e.value;
          },
        a = "function" == typeof Symbol ? Symbol : {},
        c = a.iterator || "@@iterator",
        u = a.asyncIterator || "@@asyncIterator",
        l = a.toStringTag || "@@toStringTag";
      function h(t, r, e) {
        return (
          Object.defineProperty(t, r, {
            value: e,
            enumerable: !0,
            configurable: !0,
            writable: !0,
          }),
          t[r]
        );
      }
      try {
        h({}, "");
      } catch (t) {
        h = function (t, r, e) {
          return (t[r] = e);
        };
      }
      function f(t, r, e, n) {
        var o = r && r.prototype instanceof d ? r : d,
          a = Object.create(o.prototype),
          c = new k(n || []);
        return i(a, "_invoke", { value: E(t, e, c) }), a;
      }
      function s(t, r, e) {
        try {
          return { type: "normal", arg: t.call(r, e) };
        } catch (t) {
          return { type: "throw", arg: t };
        }
      }
      e.wrap = f;
      var p = {};
      function d() {}
      function v() {}
      function y() {}
      var g = {};
      h(g, c, function () {
        return this;
      });
      var m = Object.getPrototypeOf,
        w = m && m(m(G([])));
      w && w !== n && o.call(w, c) && (g = w);
      var x = (y.prototype = d.prototype = Object.create(g));
      function L(t) {
        ["next", "throw", "return"].forEach(function (r) {
          h(t, r, function (t) {
            return this._invoke(r, t);
          });
        });
      }
      function b(r, e) {
        function n(i, a, c, u) {
          var l = s(r[i], r, a);
          if ("throw" !== l.type) {
            var h = l.arg,
              f = h.value;
            return f && "object" == t(f) && o.call(f, "__await")
              ? e.resolve(f.__await).then(
                  function (t) {
                    n("next", t, c, u);
                  },
                  function (t) {
                    n("throw", t, c, u);
                  }
                )
              : e.resolve(f).then(
                  function (t) {
                    (h.value = t), c(h);
                  },
                  function (t) {
                    return n("throw", t, c, u);
                  }
                );
          }
          u(l.arg);
        }
        var a;
        i(this, "_invoke", {
          value: function (t, r) {
            function o() {
              return new e(function (e, o) {
                n(t, r, e, o);
              });
            }
            return (a = a ? a.then(o, o) : o());
          },
        });
      }
      function E(t, r, e) {
        var n = "suspendedStart";
        return function (o, i) {
          if ("executing" === n)
            throw new Error("Generator is already running");
          if ("completed" === n) {
            if ("throw" === o) throw i;
            return N();
          }
          for (e.method = o, e.arg = i; ; ) {
            var a = e.delegate;
            if (a) {
              var c = _(a, e);
              if (c) {
                if (c === p) continue;
                return c;
              }
            }
            if ("next" === e.method) e.sent = e._sent = e.arg;
            else if ("throw" === e.method) {
              if ("suspendedStart" === n) throw ((n = "completed"), e.arg);
              e.dispatchException(e.arg);
            } else "return" === e.method && e.abrupt("return", e.arg);
            n = "executing";
            var u = s(t, r, e);
            if ("normal" === u.type) {
              if (((n = e.done ? "completed" : "suspendedYield"), u.arg === p))
                continue;
              return { value: u.arg, done: e.done };
            }
            "throw" === u.type &&
              ((n = "completed"), (e.method = "throw"), (e.arg = u.arg));
          }
        };
      }
      function _(t, r) {
        var e = r.method,
          n = t.iterator[e];
        if (void 0 === n)
          return (
            (r.delegate = null),
            ("throw" === e &&
              t.iterator.return &&
              ((r.method = "return"),
              (r.arg = void 0),
              _(t, r),
              "throw" === r.method)) ||
              ("return" !== e &&
                ((r.method = "throw"),
                (r.arg = new TypeError(
                  "The iterator does not provide a '" + e + "' method"
                )))),
            p
          );
        var o = s(n, t.iterator, r.arg);
        if ("throw" === o.type)
          return (r.method = "throw"), (r.arg = o.arg), (r.delegate = null), p;
        var i = o.arg;
        return i
          ? i.done
            ? ((r[t.resultName] = i.value),
              (r.next = t.nextLoc),
              "return" !== r.method && ((r.method = "next"), (r.arg = void 0)),
              (r.delegate = null),
              p)
            : i
          : ((r.method = "throw"),
            (r.arg = new TypeError("iterator result is not an object")),
            (r.delegate = null),
            p);
      }
      function O(t) {
        var r = { tryLoc: t[0] };
        1 in t && (r.catchLoc = t[1]),
          2 in t && ((r.finallyLoc = t[2]), (r.afterLoc = t[3])),
          this.tryEntries.push(r);
      }
      function j(t) {
        var r = t.completion || {};
        (r.type = "normal"), delete r.arg, (t.completion = r);
      }
      function k(t) {
        (this.tryEntries = [{ tryLoc: "root" }]),
          t.forEach(O, this),
          this.reset(!0);
      }
      function G(t) {
        if (t) {
          var r = t[c];
          if (r) return r.call(t);
          if ("function" == typeof t.next) return t;
          if (!isNaN(t.length)) {
            var e = -1,
              n = function r() {
                for (; ++e < t.length; )
                  if (o.call(t, e)) return (r.value = t[e]), (r.done = !1), r;
                return (r.value = void 0), (r.done = !0), r;
              };
            return (n.next = n);
          }
        }
        return { next: N };
      }
      function N() {
        return { value: void 0, done: !0 };
      }
      return (
        (v.prototype = y),
        i(x, "constructor", { value: y, configurable: !0 }),
        i(y, "constructor", { value: v, configurable: !0 }),
        (v.displayName = h(y, l, "GeneratorFunction")),
        (e.isGeneratorFunction = function (t) {
          var r = "function" == typeof t && t.constructor;
          return (
            !!r &&
            (r === v || "GeneratorFunction" === (r.displayName || r.name))
          );
        }),
        (e.mark = function (t) {
          return (
            Object.setPrototypeOf
              ? Object.setPrototypeOf(t, y)
              : ((t.__proto__ = y), h(t, l, "GeneratorFunction")),
            (t.prototype = Object.create(x)),
            t
          );
        }),
        (e.awrap = function (t) {
          return { __await: t };
        }),
        L(b.prototype),
        h(b.prototype, u, function () {
          return this;
        }),
        (e.AsyncIterator = b),
        (e.async = function (t, r, n, o, i) {
          void 0 === i && (i = Promise);
          var a = new b(f(t, r, n, o), i);
          return e.isGeneratorFunction(r)
            ? a
            : a.next().then(function (t) {
                return t.done ? t.value : a.next();
              });
        }),
        L(x),
        h(x, l, "Generator"),
        h(x, c, function () {
          return this;
        }),
        h(x, "toString", function () {
          return "[object Generator]";
        }),
        (e.keys = function (t) {
          var r = Object(t),
            e = [];
          for (var n in r) e.push(n);
          return (
            e.reverse(),
            function t() {
              for (; e.length; ) {
                var n = e.pop();
                if (n in r) return (t.value = n), (t.done = !1), t;
              }
              return (t.done = !0), t;
            }
          );
        }),
        (e.values = G),
        (k.prototype = {
          constructor: k,
          reset: function (t) {
            if (
              ((this.prev = 0),
              (this.next = 0),
              (this.sent = this._sent = void 0),
              (this.done = !1),
              (this.delegate = null),
              (this.method = "next"),
              (this.arg = void 0),
              this.tryEntries.forEach(j),
              !t)
            )
              for (var r in this)
                "t" === r.charAt(0) &&
                  o.call(this, r) &&
                  !isNaN(+r.slice(1)) &&
                  (this[r] = void 0);
          },
          stop: function () {
            this.done = !0;
            var t = this.tryEntries[0].completion;
            if ("throw" === t.type) throw t.arg;
            return this.rval;
          },
          dispatchException: function (t) {
            if (this.done) throw t;
            var r = this;
            function e(e, n) {
              return (
                (a.type = "throw"),
                (a.arg = t),
                (r.next = e),
                n && ((r.method = "next"), (r.arg = void 0)),
                !!n
              );
            }
            for (var n = this.tryEntries.length - 1; n >= 0; --n) {
              var i = this.tryEntries[n],
                a = i.completion;
              if ("root" === i.tryLoc) return e("end");
              if (i.tryLoc <= this.prev) {
                var c = o.call(i, "catchLoc"),
                  u = o.call(i, "finallyLoc");
                if (c && u) {
                  if (this.prev < i.catchLoc) return e(i.catchLoc, !0);
                  if (this.prev < i.finallyLoc) return e(i.finallyLoc);
                } else if (c) {
                  if (this.prev < i.catchLoc) return e(i.catchLoc, !0);
                } else {
                  if (!u)
                    throw new Error("try statement without catch or finally");
                  if (this.prev < i.finallyLoc) return e(i.finallyLoc);
                }
              }
            }
          },
          abrupt: function (t, r) {
            for (var e = this.tryEntries.length - 1; e >= 0; --e) {
              var n = this.tryEntries[e];
              if (
                n.tryLoc <= this.prev &&
                o.call(n, "finallyLoc") &&
                this.prev < n.finallyLoc
              ) {
                var i = n;
                break;
              }
            }
            i &&
              ("break" === t || "continue" === t) &&
              i.tryLoc <= r &&
              r <= i.finallyLoc &&
              (i = null);
            var a = i ? i.completion : {};
            return (
              (a.type = t),
              (a.arg = r),
              i
                ? ((this.method = "next"), (this.next = i.finallyLoc), p)
                : this.complete(a)
            );
          },
          complete: function (t, r) {
            if ("throw" === t.type) throw t.arg;
            return (
              "break" === t.type || "continue" === t.type
                ? (this.next = t.arg)
                : "return" === t.type
                ? ((this.rval = this.arg = t.arg),
                  (this.method = "return"),
                  (this.next = "end"))
                : "normal" === t.type && r && (this.next = r),
              p
            );
          },
          finish: function (t) {
            for (var r = this.tryEntries.length - 1; r >= 0; --r) {
              var e = this.tryEntries[r];
              if (e.finallyLoc === t)
                return this.complete(e.completion, e.afterLoc), j(e), p;
            }
          },
          catch: function (t) {
            for (var r = this.tryEntries.length - 1; r >= 0; --r) {
              var e = this.tryEntries[r];
              if (e.tryLoc === t) {
                var n = e.completion;
                if ("throw" === n.type) {
                  var o = n.arg;
                  j(e);
                }
                return o;
              }
            }
            throw new Error("illegal catch attempt");
          },
          delegateYield: function (t, r, e) {
            return (
              (this.delegate = { iterator: G(t), resultName: r, nextLoc: e }),
              "next" === this.method && (this.arg = void 0),
              p
            );
          },
        }),
        e
      );
    }
    (module.exports = r),
      (module.exports.__esModule = !0),
      (module.exports.default = module.exports);
  },
  {
    isPage: false,
    isComponent: false,
    currentFile: "@babel/runtime/helpers/regeneratorRuntime.js",
  }
);
__wxRoute = undefined;
__wxRouteBegin = undefined;
__wxAppCurrentFile__ = undefined;
define(
  "@babel/runtime/helpers/typeof.js",
  function (
    require,
    module,
    exports,
    window,
    document,
    frames,
    self,
    location,
    navigator,
    localStorage,
    history,
    Caches,
    screen,
    alert,
    confirm,
    prompt,
    XMLHttpRequest,
    WebSocket,
    Reporter,
    webkit,
    WeixinJSCore
  ) {
    function _typeof(o) {
      return (
        (module.exports = _typeof =
          "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
            ? function (o) {
                return typeof o;
              }
            : function (o) {
                return o &&
                  "function" == typeof Symbol &&
                  o.constructor === Symbol &&
                  o !== Symbol.prototype
                  ? "symbol"
                  : typeof o;
              }),
        _typeof(o)
      );
    }
    module.exports = _typeof;
  },
  {
    isPage: false,
    isComponent: false,
    currentFile: "@babel/runtime/helpers/typeof.js",
  }
);
__wxRoute = undefined;
__wxRouteBegin = undefined;
__wxAppCurrentFile__ = undefined;
define(
  "D38F48309100CF2FB5E920376AFB2D82.js",
  function (
    require,
    module,
    exports,
    window,
    document,
    frames,
    self,
    location,
    navigator,
    localStorage,
    history,
    Caches,
    screen,
    alert,
    confirm,
    prompt,
    XMLHttpRequest,
    WebSocket,
    Reporter,
    webkit,
    WeixinJSCore
  ) {
    "use strict";
    var e =
      "https://www.shouyun.tech/miniprogram/run_recorder_helper/main_request.php";
    function t(t, n, o) {
      return new Promise(function (r, u) {
        wx.request({
          url: "" == t ? e : t,
          method: n,
          header: { "content-type": "application/json" },
          data: o,
          success: function (e) {
            r(e.data);
          },
          fail: function (e) {
            u(e);
          },
        });
      });
    }
    module.exports = {
      request: t,
      upload: function (t, n, o) {
        return new Promise(function (r, u) {
          wx.uploadFile({
            url: "" == t ? e : t,
            filePath: n,
            name: "file",
            formData: o,
            success: function (e) {
              r(JSON.parse(e.data));
            },
            fail: function (e) {
              u(e);
            },
            complete: function () {},
          });
        });
      },
      format: function (e) {
        return (
          e.getFullYear() +
          "-" +
          (e.getMonth() + 1 < 10
            ? "0" + (e.getMonth() + 1)
            : e.getMonth() + 1) +
          "-" +
          (e.getDate() < 10 ? "0" + e.getDate() : e.getDate()) +
          " " +
          (e.getHours() < 10 ? "0" + e.getHours() : e.getHours()) +
          ":" +
          (e.getMinutes() < 10 ? "0" + e.getMinutes() : e.getMinutes()) +
          ":" +
          (e.getSeconds() < 10 ? "0" + e.getSeconds() : e.getSeconds())
        );
      },
      getImage: function () {
        return new Promise(function (e, n) {
          t(
            "https://apis.map.qq.com/ws/staticmap/v2/?center=39.8802147,116.415794&zoom=10&size=600*300&maptype=roadmap&markers=size:large|color:0xFFCCFF|label:k|39.8802147,116.415794&key=K2XBZ-DNKRJ-4HDFV-XYOYP-2YTTQ-UAFKX",
            "GET",
            ""
          )
            .then(function (t) {
              e(t);
            })
            .catch(function (e) {
              n(e);
            });
        });
      },
    };
  },
  {
    isPage: false,
    isComponent: false,
    currentFile: "D38F48309100CF2FB5E920376AFB2D82.js",
  }
);
__wxRoute = undefined;
__wxRouteBegin = undefined;
__wxAppCurrentFile__ = undefined;
define(
  "app.js",
  function (
    require,
    module,
    exports,
    window,
    document,
    frames,
    self,
    location,
    navigator,
    localStorage,
    history,
    Caches,
    screen,
    alert,
    confirm,
    prompt,
    XMLHttpRequest,
    WebSocket,
    Reporter,
    webkit,
    WeixinJSCore
  ) {
    "use strict";
    var a = require("D38F48309100CF2FB5E920376AFB2D82.js");
    App({
      checkUpdate: function (a) {
        if (wx.canIUse("getUpdateManager")) {
          var t = wx.getUpdateManager();
          t.onCheckForUpdate(function (e) {
            e.hasUpdate &&
              1 == a &&
              (t.onUpdateReady(function () {
                wx.showModal({
                  title: "更新提示",
                  content: "小程序新版本已经准备好，是否重启应用？",
                  success: function (a) {
                    a.confirm && t.applyUpdate();
                  },
                });
              }),
              t.onUpdateFailed(function () {
                wx.showModal({
                  title: "已经有新版本了哟~",
                  content:
                    "新版本已经上线啦~，请您删除当前小程序，重新搜索打开哟~",
                });
              }));
          });
        } else
          wx.showModal({
            title: "提示",
            content:
              "当前微信版本过低，无法使用该功能，请升级到最新微信版本后重试。",
          });
      },
      onLaunch: function () {
        var t = this;
        wx.login({
          success: function (e) {
            if (e.code) {
              var n = { purpose: "getUpdateInfo", key: { code: e.code } };
              a.request("", "GET", n)
                .then(function (a) {
                  console.log(a);
                  var e = a.data;
                  (t.globalData.openId = e.openid),
                    (t.globalData.todayRunDistance = e.todayDistance),
                    (t.globalData.nickname = e.nickname),
                    (t.globalData.avator = e.avator),
                    (t.globalData.admin = e.admin),
                    t.checkUpdate(e.update),
                    t.getDatacallBack && t.getDatacallBack(e.todayDistance);
                })
                .catch(function (a) {
                  console.log(a), t.getDatacallBack && t.getDatacallBack(-1);
                });
            } else
              console.log("登录失败！" + res_login.errMsg),
                t.getDatacallBack && t.getDatacallBack(-1);
          },
        });
      },
      globalData: {
        openId: "",
        todayRunDistance: -1,
        lastRunstartTime: 0,
        nickname: "",
        avator: "",
        latitude: "39.872801",
        longitude: "116.413426",
        enableSatelliteStyle: !1,
        hasPrivacyAuthrize: !1,
        adUnits: {
          banner: "adunit-c16a80ddb9e8f303",
          jl_video: "adunit-0a71da8c64af9e6f",
          chaping: "adunit-f4d2cc5d940a2eb1",
          video: "adunit-e2d8ad5303650fc1",
          gezi: "adunit-0818306d15a8cdbd",
        },
      },
    });
  },
  { isPage: false, isComponent: false, currentFile: "app.js" }
);
require("app.js");
